Skip to content

Rhel10 and SELinux compatibility #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

observable-it
Copy link

RHEL10:
I'm testing this role on a RHEL 10 VM. This role crashes on RHEL 10 because the syslog logrotation file is called differently: /etc/logrotate.d/rsyslog instead of /etc/logrotate.d/syslog. When testing, I discovered that the main.yml task contains the wrong order of "with_first_found", first it finds RedHat10.0, then RedHat, then RedHat10 then RedHat. As a result, only the RedHat.yml file is used, which contains the wrong "logrotate_file" variable.

SELinux:
Sometimes Splunk wouldn't start after installing or upgrading when SELinux is in enforcing mode (common issue on RHEL based systems).
On RHEL-based systems with SELinux enabled, extracting files from a tarball (e.g., using tar -xvf) does not automatically restore the correct SELinux security contexts for the extracted files. This can result in Splunk not starting or working correctly after install or upgrading. To resolve this, a restorecon -R task is added after extraction to apply the expected SELinux contexts based on policy.

Requirements files.
RHEL 10 includes a reduced set of default Ansible collections and Python modules. Explicit requirements files are added to ensure all necessary dependencies are available.
Not sure if this is a desired way of maintaining dependencies for this repository (maybe people prefer adding requirements to the readme or environment)

observable-it and others added 5 commits June 9, 2025 09:55
…Splunk is launched. This should solve issues when Splunk is Running on RHEL systems
… fallback

The variable include logic was checking for RedHat10.0.yml before RedHat10.yml,
which caused the more general RedHat.yml to be included instead of the correct
major version-specific file. This commit reorders the fallback list to check
RedHat10.yml (using ansible_distribution_major_version) before RedHat.yml,
ensuring correct variable precedence on systems like RHEL 10.

Also improves compatibility with other distros that may report minor versions
(e.g., 10.0) not matching existing variable files.
…on RHEL 10 systems. Adding requirements.yml for Ansible and requirements.txt for Python
Added newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant